Embodiments of the invention relate generally to computer memory management. Specifically, the embodiments are directed to data processing systems, methods and computer program products for reducing cache line contention in a multiprocessor architecture.
Computer operating systems generally use a memory paging process to maximize the benefits of high-performance, but limited in size, system physical memory. The paging process allows processors to quickly access memory pages that the processors frequently need because the operating system maintains these pages in physical memory and does not need to fetch them from a slower data storage medium such as disk storage. In an advanced multiprocessor system, the amount of physical memory is relatively small compared to the number of pages that the processors may target to be resident in physical memory. As a result, an operating system may constantly move (or “page”) data in and out of physical memory as requested by the processors or based on a page replacement algorithm. The pages that are maintained in physical memory and cannot be paged out are referred to as pinned pages. The pages that have been unpinned and may be paged out of physical memory are referred to as pageable or unpinned pages.
In order to fully utilize but not exceed physical memory capacity, the operating system may maintain a count field that contains the number of available physical memory pages that may be pinned by the processors in the system. The processors may request one or more pages from the count field when they pin memory pages. When a processor needs to pin a number of pages, it would compare the count field to the number of pages needed for the pin operation. If the count has sufficient pages available for pinning, the count is reduced by the number of pages that are pinned. Similarly, in an unpin operation, the count is increased by the number of pages that a processor unpins. In an advanced multiprocessor architecture, such a system count of the pages available for pinning leads to cache contention among the processors due to frequent accessing and updating of the count field, and inter-processor memory traffic, which in turn degrades system performance.
There is thus a need for a more efficient system and method for maintaining the count of memory pages available for pinning in a multiprocessor system.